<?php
include("../db_connect.php");
include("../class/objName.php");

$qtyid = $_GET['qtyid'];
$data = explode(",,",$qtyid);
$num = count($data);
$valid = "";

for($x=0; $x<$num; $x++){
	$z = explode(",",$data[$x]);
	$result=mysql_query("select * from tblswaping where id='".$z[1]."' and categories ='Acccessories'") or die("select name from tblmodel where id=$brand"."<br/><br/>".mysql_error());
	$row = mysql_fetch_array($result);	
	$qty = $row['quantity'];
	if($z[0]>$qty){
		$valid = 'true';
		break;
	}else {
		$valid = 'false';
	}
	//echo $z[0].'>'.$qty.'<>'. $z[1] . "==" . $data[$x] ."&&";
	
}

echo $valid;

?>